home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / EDUCMATH / CURVEFIT.LZH / README.DOC < prev   
Text File  |  1988-09-09  |  9KB  |  177 lines

  1. CURVEFIT 2.11-B 9/05/88  Thomas S. Cox  102 Evergreen St. Easley, SC  29640
  2. ===============================================================================
  3. This disk contains the program CURVEFIT compiled using the following Basic
  4. Compilers: Quick Basic 3.0 by Microsoft, Quick Basic 4.0 by Microsoft, and
  5. Turbo Basic 1.1 by Borland.  The source code is the same for all versions
  6. except for Title changes in the main screen area to identify which compiler
  7. was used.  
  8.  
  9. This version of CURVEFIT is 2.11-B, created on 7/29/88.
  10.  
  11. This version of CURVEFIT is essentially the same as the last released version
  12. except that there are three compiled versions.  A bug related to improper
  13. initialization of variables has been corrected since version 2.11-A  
  14. The respective versions are:
  15.  
  16.      CURVEFIT.EXE compiled with Microsoft's Quick Basic 3.0
  17.      CURVEQB4.EXE compiled with Microsoft's Quick Basic 4.0
  18.      CURVETB1.EXE compiled with Borland's Turbo Basic 1.1   
  19.  
  20. CURVEFIT compiled with Quick Basic 3.0 will, on some linear data sets, 
  21. arbitrarily and mysteriously set the A and B coefficients of Equation #1
  22. (LINEAR) to zero.  Neither of the other compiled versions do that.  Neither 
  23. does CURVEFIT when run as an Interpreted Basic program.  See example data
  24. file EXLINEAR.DAT for an example of this behavior.
  25.  
  26. Late note  9/3/88: CURVEFIT and CURVEQB4 do not crash for the following
  27. data set but give erroneous answers for Equation 19 (Hoerl).  Also, the
  28. Interpreter version of Basic gives erroneous answers for Hoerl.  The
  29. above mentioned programs will also hang-up when trying to show predicted
  30. values for any of the equations.    
  31.  
  32.     23400,25; 23525,37.5; 23650,41.25; 23775,42.813; 23900,40
  33.  
  34. CURVETB1  will calculate the Sum of Squares but totally lock-up
  35. computer when calculating the coefficients.  I don't know exactly why, but
  36. think it has something to with numeric overflow.
  37.  
  38. CURVEQB4 compiled with Quick Basic 4.0b will totally lock up computer should
  39. there be a divide by zero error while a math co-processor is present on
  40. SOME, but not all machines.  This can be avoided by setting the environment
  41. to not recognize that a co-processor is available.  At DOS prompt type
  42. SET NO87=NO Math Coprocessor.
  43.  
  44. The divide by zero bug is known to be present in early Wells-American
  45. machines that operate at 6 and 8 MHZ.  Does not seem to be present in
  46. later versions of the Wells American Computers.
  47.  
  48. CURVETB1 compiled with Turbo Basic 1.1 seems to work under all conditions that
  49. I have tried (except for the example cited under CURVEFIT listed above).
  50. This program is significantly faster than the Quick Basic
  51. 3.0 version (at least it is on my Wells-American AT Clone with 80287)
  52. and at least as fast at the Quick Basic 4.0b version.  Note that it was
  53. necessary to change a TAB(5) statement to TAB(6) when displaying the Sums
  54. and Sums of Squares on Screen with this compiler (8/1/88).
  55.  
  56. COMMENT:
  57. It sure would be nice if these different compilers worked the same.  The lack
  58. of consistancy is a constant source of irritation and frustration!  
  59.  
  60. CURVEFIT.BAS as used with Interpreter Basic does not properly recognize the
  61. use of Function Keys for selection of Main Menu items.  Please use arrow
  62. keys to select Menu options.  Please note that the Interpreter version of
  63. Basic does not crash when there is numeric overflow, it just substitutes the
  64. largest number that it knows of and keeps on trucking.  
  65.  
  66. The source code for an additional version of CURVEFIT has been included.  It
  67. is CURVE_AV which prints the sum of Absolute Values of the Residuals for the
  68. various equations.  It is yet another way to determine the goodness of fit of
  69. a curve.  The program functions generally the same as the other versions of
  70. CURVEFIT except that when the BEST FIT routine is called, the Absolute Value
  71. of Residuals (titled Mean Absolute Difference in Program) replaces the 
  72. equation identification column.  Because the coding for this program is 
  73. significantly longer than for the other versions it is necessary to restrict 
  74. this version to 100 data points for it to work with Interpreter Basic.  This
  75. version is labeled as version 2.20-A.
  76.  
  77. File List: 
  78. ----------
  79. Included in CURVEFIT.ARC        CURVEFIT.BAS   Source Code
  80.                                 CURVE_AV.BAS   Source Code
  81.                     CURVEFIT.DOC   Documentation for CURVEFIT
  82.                                 CURVEFIT.EXE   Quick Basic 3.0 Compiled
  83.                                 CURVEQB4.EXE   Quick Basic 4.0b Compiled
  84.                                 CURVETB1.EXE   Turbo Basic 1.1 Compiled
  85.                                        *.DAT   Example Data Files                      
  86.  
  87. Other Files                       README.DOC   This File (Brief Descriptions)
  88.                                     ARCE.COM   File to extract files in
  89.                                                CURVEFIT.ARC
  90.                                     ARCE.DOC   Documentation for ARCE.COM
  91.  
  92. Unarchiving Files
  93. -----------------
  94. Use the file ARCE on this disk for unarchiving programs in CURVEFIT.ARC
  95.  
  96. For brief instructions just type ARCE when logged to this disk.  For more
  97. extensive instructions please see the ARCE.DOC file.
  98.  
  99.  
  100. Error in Version 2.11-A of CURVEFIT
  101. -----------------------------------
  102. A bug that caused the same data set to produce different answers if not
  103. run as the first data set after loading CURVEFIT has been corrected.  This
  104. bug was due to improper initialization of the Equation Coefficient Arrays.
  105.  
  106. For persons having version 2.11-A, the initialization bug can be ignored if
  107. CURVEFIT is reloaded for each data set.
  108.  
  109.  
  110. Work-Around for Bug in CURVEFIT 2.11B (Quick-Basic 3.0 Version Only)
  111. --------------------------------------------------------------------
  112. Unfortunately I know of no way to predict when version 2.11-B will give
  113. erroneous information on a Linear Equation but the error will be obvious as
  114. both the A and B coefficients will be set to zero.  In such an instance 
  115. changing one data point just slightly, say from 2 to 2.0000001, will normally 
  116. alleviate this problem.  Strangely, a completely linear data set such as
  117. {1,1; 2,2; 3,3; 4,4; and 5,5} does not induce this error.  A data set that
  118. does induce this error is: {20,1.2; 40,2; 60,2.8; 70,3.2; and 80,3.6}.
  119.  
  120.  
  121. SHAREWARE:
  122. ----------
  123. This program is SHAREWARE.  A donation of $10 to the author at the following
  124. address would be most appreciated.
  125.  
  126.                        Thomas S. Cox
  127.                        102 Evergreen Street
  128.                        Easley, SC  29640
  129. ==============================================================================
  130. Later Notes: 9/6/88
  131.  
  132. Further investigation of operation of CURVEFIT has shown that the program will
  133. calculate the sums of squares correctly.  However, when calculating the
  134. equation coefficients, there may be a numeric overflow condition.  When this
  135. occurs, strange things happen.  In some cases the computer locks up.  In other
  136. cases the coefficients are viewable, but some are wrong.  In other cases the
  137. coefficients are viewable, but any attempt to view PREDICTED results hangs
  138. up and throws computer back to view coefficients screen.  When this happens,
  139. it is NEVER possible to see PREDICTED results on screen for any equation.
  140.  
  141. All of this mysterious operation seems to be related to how the program
  142. treats a numeric overflow error condition.
  143.  
  144. Equations that use EXP to calculate the equation coefficients are the ones
  145. most likely to give erroneous results.  
  146.  
  147.     Equations using EXP to calculate one or more coefficients are:
  148.  
  149.     Hoerl, Modified Hoerl, Root, Super Geometric, Modified Geometric,
  150.         Exponential, Modified Exponential, Normal, Log-Normal, Beta,
  151.  
  152. Please keep these quirks in mind when using CURVEFIT.
  153. ===============================================================================
  154.  
  155. Brief note about BASLISTI.BAS.  
  156.  
  157. This is the source code of a BASIC program, stored as a straight ASCII file,
  158. for making a 'PRETTY' listing of a BASIC program that is stored as an ASCII
  159. file.  It has options for controlling:
  160.  
  161.     1. Number of characters per line
  162.     2. One Statement per line
  163.     3. Control of Epson type printer for Compressed, Elite, or Pica
  164.     4. Indention for left margin
  165.     5. Ability to strip high bit from files created with Wordstar
  166.            (Document Mode)
  167.  
  168. To use this program, one needs to either have Interpreter Basic or one of
  169. the Compiler Basics.
  170.  
  171. This program is Public Domain.  No registration fee.  Duplicate freely.
  172.  
  173. I have found that this program is very useful for keeping hard 
  174. copies of BASIC source code in a notebook.
  175.  
  176. 9-09-88  2:24:23 pm
  177. ===============================================================================